import { FieldRule, FileData } from '@/components/type/core'
import { genKey } from '@/components/utils'
import { FieldDefinition, GridDefinition, TabsDefinition } from '..'

export class FieldModalDefinition {
  type = 'modal'
  key: string = genKey()
  name = '弹出页面'
  model: string = 'modal_' + genKey()
  list: Array<FieldDefinition | GridDefinition | TabsDefinition> = []
  options: FieldModalOptions = new FieldModalOptions()
  rules?: FieldRule[] = []
}

export class FieldModalOptions {
  disabled = false
  hidden = false
  required = false
  defaultValue = []
  text = '查看'
  width = '60vw'
}
